/**
 * @file: proc.h
 * @author: yumeng (imyumeng@qq.com)
 * @brief:
 * @version 0.1
 * @date: 2021-09-05
 *
 * @copyright Meng_Yu Copyright (c) 2021
 *
 * @history: init first version. 2021-09-05
 */
#ifndef _PROC_H_
#define _PROC_H_

#define INI_NAME "binalign.ini"
#define INI_DEF_STR "a.bin"

#define INI_SEC_BIN 			"bin"
#define INI_SEC_BIN_NUM 		"num"

#define INI_SEC_SUB_BIN_PRELEN 	"prelen"
#define INI_SEC_SUB_BIN_LEN 	"len"
#define INI_SEC_SUB_BIN_PAT 	"pat"
#define INI_SEC_SUB_BIN_IN 		"bin_in"
#define INI_SEC_SUB_BIN_OUT 	"bin_out"

#define STR_LEN 128
#define BIN_NUM 128
#define PATH_LEN 512

typedef struct
{
	unsigned char ini_path_name[PATH_LEN];
	unsigned int bin_num;
	unsigned int pre_len[BIN_NUM];
	unsigned int align_len[BIN_NUM];
	unsigned int fill_pat[BIN_NUM];
	char bin_in[BIN_NUM][STR_LEN];
	char bin_out[BIN_NUM][STR_LEN];
}proc_data_t;

extern proc_data_t g_data;
extern int Read_Tnifile(void);
extern int Write_Tnifile(void);
extern void path_proc(char *path);

#endif /* _PROC_H_ */
